﻿@model IEnumerable<SAKS.ViewModels.ProjectListModel>

@{
    ViewBag.Title = "我加入的项目";
}

            <link href="@Url.Content("~/Content/themes/base/datatable_ui.css")" rel="stylesheet" type="text/css" />
            <script src="@Url.Content("~/Scripts/jquery.dataTables.js")" type="text/javascript"></script>

            <script type="text/javascript">
                $(function () {
                    var datatablelang = {
                        "sLengthMenu": "每页显示 _MENU_ 条记录",
                        "sZeroRecords": "没有找到任何记录",
                        "sInfo": "_START_ 到 _END_ - 共 _TOTAL_ 条记录",
                        "sInfoEmpty": " 0 到 0 - 共 0 records",
                        "sInfoFiltered": "(从 _MAX_ 条记录中过滤后的结果)",

                        "sProcessing": "处理中...",
                        "sEmptyTable": "表中没有可用数据",
                        "sSearch": "表内搜索 :",
                        "oPaginate": {
                            "sFirst": "首页",
                            "sPrevious": "上一页",
                            "sNext": "下一页",
                            "sLast": "末页"
                        }
                    };
                    var oTable = $("#project-list-table").dataTable({
                        "aaSorting": [[5, "desc"]],
                        "bLengthChange": true,
                        "iDisplayLength": 25,
                        "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] }],
                        "bJQueryUI": true,
                        "oLanguage": datatablelang
                    });
                });
            </script>
            
                

            @if (Model.Count() == 0)
            {
                <p>您没有加入任何项目</p>
            }
            else
            {
                <table cellpadding="0" cellspacing="0" border="0" class="display" id="project-list-table">
                    <thead>
                        <tr>
                            <th width="5%"></th>
                            <th width="15%">项目名称</th>
                            <th width="15%">领域</th>           
                            <th width="10%">总设计师</th>
                            <th width="10%">负责人</th>
                            <th width="10%">创建日期</th>
                        </tr>
                    </thead>
                    <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @Html.ActionLink("查看", "Details", "Project", new { Id = item.Id }, new { })        
                            </td>
                            <td>
                                @item.Name
                            </td>
                            <td>
                                @item.SpecializedField
                            </td>
                            <td>
                                @item.PrimaryDesigner
                            </td>
                            <td>
                                @item.ResponsibleOfficer         
                            </td>
                            <td>
                                @item.CreatedDate         
                            </td>
                        </tr>
                    }
	                </tbody>
	                <tfoot>
                        <tr>
                            <th ></th>
                            <th >项目名称</th>
                            <th >领域</th>           
                            <th >总设计师</th>
                            <th >负责人</th>
                            <th >创建日期</th>
                        </tr>
	                </tfoot>
                </table>
                }

            


